{if $vpage}
    <a href="admin/modules/tangra_cms/vpage/vpage_manage.php?manage={$vpage->get_id()}" class="action_back">Back to virtual page &quot;{$vpage->get_path()}&quot; (ID: {$vpage->get_id()})</a><br /><br />
{else}
    {if $category_id}
        <a href="admin/modules/tangra_cms/category/category_content.php?category={$category_hid}" class="action_back">Back to category &quot;{$category_title}&quot; content items list</a><br />
        {else}
        <a href="admin/modules/tangra_cms/ci/cis.php" class="action_back">Back to content items list</a><br />
    {/if}
{/if}
<br />
<table width="1000" border="1" cellspacing="0" cellpadding="0" class="info_page_main_table">
    <tr>
        <td>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="info_page_section_table">
                <tr>
                    <td>
                        <table width="100%" border="0" cellspacing="1" cellpadding="4">
                            <tr>
                                <td align="right" width="250" class="info_page_label_cell" valign="top">Title</td>
                                <td align="left" class="info_page_content_cell" valign="top">{$ci_article.title}</td>
                            </tr>
                            <tr>
                                <td align="right" width="250" class="info_page_label_cell" valign="top">Created</td>
                                <td align="left" class="info_page_content_cell">{$ci_article.created}</td>
                            </tr>
                            <tr>
                                <td align="right" width="250" class="info_page_label_cell" valign="top">Used?</td>
                                <td align="left" class="info_page_content_cell">
                                {if !$used}
                                No
                                {else}
                                Used by {$used} page(s)
                                {/if}
                                </td>
                            </tr>
                            <tr>
                                <td align="right" width="250" class="info_page_label_cell" valign="top">Content</td>
                                <td align="left" class="info_page_content_cell" valign="top">{$ci_article.content|truncate:"200"}</td>
                            </tr>
                            <tr>
                                <td align="right" width="250" class="info_page_label_cell" valign="top">Intro</td>
                                <td align="left" class="info_page_content_cell" valign="top">{if $ci_article.intro|truncate:"200"}{$ci_article.intro}{else}<span class="no_value">No value</span>{/if}</td>
                            </tr>
                        </table>
                    </td>
                    <td class="info_page_link_cell" align="center" width="180">
                    	<a href="admin/modules/tangra_cms/ci/ci_article/ci_article_edit.php?ci_article_obj_id={$ci_article.id}" class="action_edit">Edit</a><br /><br />
                        <a href="admin/modules/tangra_cms/ci/ci_article/ci_article_preview.php?ci={$ci_id}" {popup text="Click to preview in new window"} target="_blank" class="action_preview">Preview</a>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="info_page_section_table">
                <tr>
                    <td>
                        <table width="100%" border="0" cellspacing="1" cellpadding="4">
                            <tr>
                                <td align="right" width="250" class="info_page_label_cell" valign="top">History</td>
                                <td align="left" class="info_page_content_cell" valign="top">
									{if $created_mod}Created by <strong>{$created_mod.user}</strong> on {$created_mod.ts}<br />{/if}
									{if $last_mod}Last modified by <strong>{$last_mod.user}</strong> on {$last_mod.ts}{/if}                                    
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </td>
    </tr>

    <tr>
        <td>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="info_page_section_table">
                <tr>
                    <td>
                        <table width="100%" border="0" cellspacing="1" cellpadding="4">
                            <tr>
                                <td align="right" width="250" class="info_page_label_cell" valign="top">Authors</td>
                                <td align="left" class="info_page_content_cell" valign="top">
                                    {if $authors}
                                    <table width="100%" border="0">                                
                                    {foreach from=$authors item=author}
                                        <tr>
                                            <td width="16"><img src="/img/modules/crystal_icons_small/16x16/user.png" alt="author" width="16" height="16" /></td>
                                            <td align="left">{$author}</td>
                                        </tr>
                                     {/foreach}
                                    </table>
                                    {else}                                    
                                    <span class="no_value">None selected</span>
                                    {/if}
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td class="info_page_link_cell" align="center" width="180"><a href="admin/modules/tangra_cms/ci/ci_nom_select.php?_transit_ci={$ci_id}&amp;_transit_ciat={$authors_attr_type_id}&amp;_transit_nom=ci_authors&amp;_transit_ret=admin/modules/tangra_cms/ci/ci_article/ci_article_manage.php" class="action_manage">Manage authors</a></td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="info_page_section_table">
                <tr>
                    <td>
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td class="full_height">
                                    <table width="100%" border="0" cellspacing="1" cellpadding="4" class="full_height">
                                        <tr>
                                            <td align="right" width="250" class="info_page_label_cell">Images</td>
                                            <td align="left" class="info_page_content_cell">
                                                {if $images}
                                                <table width="100%" border="0" cellpadding="2">
                                                    {foreach from=$images item=image}
                                                    <tr>
                                                        <td width="{$t2_width}" height="{$t2_height}" style="border:1px solid #000000;"><a href="admin/modules/tangra_cms/get_img_admin.php?imgid={$image->get_id()}" target="_blank"><img src="admin/modules/tangra_cms/get_img_admin.php?imgid={$image->get_id()}&amp;imgvar=t2" border="0" width="{$t2_width}" height="{$t2_height}" /></a></td>
                                                        <td align="left"><a href="admin/modules/tangra_cms/get_img_admin.php?imgid={$image->get_id()}" target="_blank">{$image->get_orig_filename()}</a></td>
                                                    </tr>
                                                    {/foreach}
                                                </table>
                                                {else} <span class="no_value">None</span>&nbsp;&nbsp;<a href="admin/modules/tangra_cms/ci/ci_image_select.php?ci={$ci_id}&amp;_transit_ret=admin/modules/tangra_cms/ci/ci_article/ci_article_manage.php" class="action_select">Select image from existing</a>&nbsp;&nbsp;&nbsp;<a href="admin/modules/tangra_cms/image/image_upload.php?upload=1&amp;ci={$ci_id}&amp;_transit_ret=admin/modules/tangra_cms/ci/ci_article/ci_article_manage.php" class="action_upload_image">Upload new image</a>
                                                {/if} </td>
                                        </tr>
                                    </table>
                                </td>
                                <td class="info_page_link_cell" align="center" width="180"><a href="admin/modules/tangra_cms/ci/ci_images.php?ci={$ci_id}&amp;_transit_ret=admin/modules/tangra_cms/ci/ci_article/ci_article_manage.php" class="action_manage">Manage images</a>
                                </td>
                            </tr>
                            <tr>
                                <td class="full_height">
                                    <table width="100%" border="0" cellspacing="1" cellpadding="4" class="full_height">
                                        <tr>
                                            <td align="right" width="250" class="info_page_label_cell">Attachments</td>
                                            <td align="left" class="info_page_content_cell">
	                                            {if $attachments}
                                                <table width="100%" border="0" cellpadding="2" cellspacing="0">
                                                    {foreach from=$attachments item=attachment}                                                
                                                    <tr>
                                                        <td width="16"><img src="/img/modules/crystal_icons_small/16x16/save.png" alt="attachment" width="16" height="16" /></td>
                                                        <td align="left">{$attachment->get_orig_filename()} ({$attachment->get_size()/1024|string_format:"%.2f"} KB)</td>
                                                    </tr>
                                                    {/foreach}                                                    
                                                </table>
                                                {else}
                                                <span class="no_value">None</span>&nbsp;&nbsp;<a href="admin/modules/tangra_cms/ci/ci_attachment_select.php?ci={$ci_id}&amp;_transit_ret=admin/modules/tangra_cms/ci/ci_article/ci_article_manage.php" class="action_select">Select file from existing</a>&nbsp;&nbsp;&nbsp;<a href="admin/modules/tangra_cms/attachment/attachment_upload.php?upload=1&amp;ci={$ci_id}&amp;_transit_ret=admin/modules/tangra_cms/ci/ci_article/ci_article_manage.php" class="action_upload_attachment">Upload new file</a>
                                                {/if}
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                                <td class="info_page_link_cell" align="center" width="180"><a href="admin/modules/tangra_cms/ci/ci_attachments.php?ci={$ci_id}&amp;_transit_ret=admin/modules/tangra_cms/ci/ci_article/ci_article_manage.php" class="action_manage">Manage attachments</a></td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </td>
    </tr>        
</table>    
